from selenium.webdriver.common.by import By

from testmain.login import Login
from utils.util import BoxDriver,BasePage

class adduser:

    def dingwei(self):
        driver = BoxDriver('Chrome', 'http://192.168.85.34:10086/ranzhi/sys/user-login.html')
        Login().login(driver, 'admin', '123456')
        # 定位后台管理
        driver.find_element(By.XPATH,'//*[@id="s-menu-superadmin"]/button').click()
        driver.switch_to_frame(By.ID,'//*[@id="iframe-superadmin"]')
        # 点击添加成员
        driver.findElementByText('添加成员').click()

    def adduser(self,driver,username,passwd):
        self.dingwei()
        # 添加成员

if __name__ == '__main__':
    pass
    # driver = BoxDriver('Chrome', 'http://192.168.85.34:10086/ranzhi/sys/user-login.html')
    # Login().login(driver,'admin','123456')